package cn.sdormitory.smartclass.entity;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @创建人：zhouyang
 * @创建时间：2021/12/20 15:05
 * @version：V1.0
 * 班级报修表
 */
@Data
@TableName("class_repair")
public class ClassRepair {
    /**
     * ID
     */
    @TableId
    @ApiModelProperty(value = "ID")
    private Long id;

    /**
     * 所属班级ID
     */
    @ApiModelProperty(value = "所属班级ID")
    private Long classId;

    /**
     * 班级名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "班级名称")
    private String className;

    /**
     * 报修说明
     */
    @ApiModelProperty(value = "报修说明")
    private String repairDesc;

    /**
     * 报修状态(0->已报修；1->处理中；2->正常
     */
    @ApiModelProperty(value = "报修状态(0->已报修；1->处理中；2->正常")
    private String status;

    /**
     * 报修人
     */
    @ApiModelProperty(value = "报修人")
    private String repairBy;

    /**
     * 照片
     */
    @ApiModelProperty(value = "照片")
    private byte[] photo;

    /**
     * 报修时间
     */
    @ApiModelProperty(value = "报修时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN, timezone = "GMT+8")
    @DateTimeFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private Date modifyTime;

    @TableField(exist = false)
    private List<Long> deviceIds;

    @TableField(exist = false)
    private String deviceName;

    @TableField(exist = false)
    private String devicesId;

    @TableField(exist = false)
    private String createBy;

    @ApiModelProperty(value = "是否值班提交 1：是 0或null：否")
    private String isDuty;

    @TableField(exist = false)
    private String deviceStr;
}
